package ninja.awesome.game.gameobject;
/*package GameObject;

import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.image.Image;

import classes.Friendly;
import main.Animation;
import main.Controller;
import main.Game;
import main.Sound;
import main.Sprites;

public class weapons extends GameObj implements Friendly {

	private String direction;
	private int speed = 4; // I put 0 since the swing shall not move
	private int timer = 0;
	private int swingTimer;
	private double weaponDmg;
	private double weaponElement;
	private double weaponSwingSpeed;
	private boolean hit = true;
	private boolean isJumping = true;
	private boolean isAttacking = true;
	private boolean isRunning = true;

	private Image[] katanaAttack;
	
	
	Image image;
	Image[] weapon;
	Game game;
	Sprites s;
	Sound boom;
	Animation explosion;
	Controller c;
	int flag = 2;
	Animation katana; // to show attack for player!!!

	private int selectPicture = 0;

	public weapons(int x, int y, String direction, Game game, Controller c,
			Sprites s, int flag) {
		super(x, y);
		this.game = game;
		this.c = c;
		this.direction = direction;
		this.s = s;
		this.swingTimer = 0;

		if (flag == 2) {
			weapon = this.s.getkatanaAttack();
			katana = new Animation(5, weapon[0], 200, 200, 3);
			
			
		}

	}

	public void update() {

		if (flag == 2) {
			swingTimer++;
			if (swingTimer >= 4) {
				// c.removeFriendly(this);
			}
			if (!hit) {
				if (timer == 40) {
					// c.removeFriendly(this);
					timer++;

				}
			} else if (hit) {
				if (timer >= 40) {
					// c.removeFriendly(this);
				}
				timer++;
				// explosion.runAnimation();

			}
			if (direction == "right") {
				xLoc += speed;
				System.out.println(xLoc);
			}
			if (direction == "left") {
				xLoc -= speed;
				System.out.println(xLoc);
			}
		}
		katana.runAnimation();
	}

	public void draw(Graphics g) {
		if (flag == 2) {
			if (!hit) {
				katana.runAnimation();
				katana.drawAnimation(g, (int) xLoc, (int) yLoc);

			}

			if (game.getNinja().getDirection().equals("left")) {
				katana.setAction(0);
				katana.setImageNumber(3);
				katana.drawAnimation(g, game.getNinja().getX(), game.getNinja().getY());
				
				
				katana.setAction(0);
				katana.setImageNumber(3);
				katana.drawAnimation(g, game.getNinja().getX(), game.getNinja().getY());

				katana.setAction(0);
				katana.setImageNumber(3);
				katana.drawAnimation(g, game.getNinja().getX(), game.getNinja().getY());

			}
		}

		if (game.getNinja().getDirection().equals("right")) {
			katana.setAction(0);
			katana.setImageNumber(3);
			katana.drawAnimation(g, game.getNinja().getX(), game.getNinja().getY());

			katana.setAction(0);
			katana.setImageNumber(3);
			katana.drawAnimation(g, game.getNinja().getX(), game.getNinja().getY());

			katana.setAction(0);
			katana.setImageNumber(3);
			katana.drawAnimation(g, game.getNinja().getX(),game.getNinja().getY());

		}

	}

	public Rectangle getBounds() {
		Rectangle a = null;

		if (flag == 2) {
			a = new Rectangle((int) xLoc, (int) yLoc, 200, 200);
		}
		return a;
	}

	// GETTERS
	public int getX() {
		return xLoc;
	}

	public int getY() {
		return yLoc;
	}
	
	public double getweaponDmg(){
		return weaponDmg;
	}
	
	public double getweaponElement(){
		return weaponElement;
	}
	
	public double getweaponSwingSpeed(){
		return weaponSwingSpeed;
	}
	// Setters
	public void SetX(int x) {
		this.xLoc = x;
	}

	public void SetY(int y) {
		this.yLoc = y;
	}
	
	public void setweaponDmg(double weaponDmg){
		this.weaponDmg = weaponDmg;
	}
	
	public void setweaponElement(double weaponElement){
		this.weaponElement = weaponElement;
	}
	
	public void setweaponSwingSpeed( double weaponSwingSpeed){
		this.weaponSwingSpeed = weaponSwingSpeed;
	}

	public int getTimer() {
		return timer;
	}

	public void setTimer(int timer) {
		this.timer = timer;
	}

	public boolean getHit() {
		return hit;
	}

	public void setHit(boolean hit) {
		this.hit = hit;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}

	public String getDirection() {
		return this.direction;
	}

}
*/